package com.oa.dao.impl;

import java.sql.SQLException;

import com.oa.bean.UserInfo;
import com.oa.dao.UserInfoDao;

public class UserInfoDaoImpl extends CommonDao<UserInfo> implements UserInfoDao {

	@Override
	public int getTotal() {
		String sql="select count(*) from userinfo";
		int count=0;
		try {
			open_db();
			pst=conn.prepareStatement(sql);
			rs=pst.executeQuery();
			while (rs.next()) {
				count=rs.getInt(1);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}finally {
			close_db();
		}
		return count;
	}

}
